﻿using Andy.Web.NguoiDungServiceReference;
using Andy.Web.SanPhamServiceReference;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Andy.Web.admin
{
    public partial class ht_themlsp : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btLuu_Click(object sender, EventArgs e)
        {
            string result = "";
            using (var spService = new SanPhamServiceReference.SanPhamServiceClient())
            {

                var sp = new LoaiSanPham();
                sp.Ten = txtTen.Text;
                sp.Ma = txtMa.Text;
                result += spService.CapNhatLoaiSanPham(sp);
            }
            ScriptManager.RegisterStartupScript(this, this.GetType(), "Redit", "alert('" + result + " !'); window.location='" + Request.ApplicationPath + "admin/ht_qllsp.aspx';", true);
        }
    }
}